package com.ll.SchoolSafe.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

//把一个普通的类变成配置类 类似与.........xml文件
@Configuration
//开启swagger2
@EnableSwagger2
public class swaggerConfig2 {
    @Bean
    //把新建的对象放到容器中
    public Docket docket(){
        return new Docket(DocumentationType.SWAGGER_2);
    }

}
